//
//  Header.swift
//  Merchant
//
//  Created by sunzc on 5/30/19.
//  Copyright © 2019 Yuri. All rights reserved.
//

import UIKit

extension UIDevice {
    
    var isX:Bool {
        return UIScreen.main.bounds.height >= 812
    }
}

extension UIScreen {
    
    /// 设计图比例，只根据屏幕宽度进行缩放
    static let designScale:CGFloat = UIScreen.main.bounds.width / 375.0
}

extension CGFloat {
    
    var scaleLength:CGFloat {
        
        return UIScreen.designScale * self
    }
    
}

extension Int {
    
    var scaleLength:CGFloat {
        return UIScreen.designScale * CGFloat(self)
    }
    
}

extension Float {
    
    var scaleLength:CGFloat {
        return UIScreen.designScale * CGFloat(self)
    }
    
}

extension Double {
    
    var scaleLength:CGFloat {
        return UIScreen.designScale * CGFloat(self)
    }
    
}
